<?php
/**
 * User: i@fedax.cn
 * Time: 2018/7/26 14:33
 */

namespace app\admin\model;


class HotDoor extends DataBase
{
    protected $name = 'hot_door';
    protected $autoWriteTimestamp = 'datetime';


    /**
     * @param $page_config
     * @param $where
     * @param $order
     * @return \think\Paginator
     * @throws \think\exception\DbException
     */
    public function getDataList($page_config, $where, $order)
    {
        $dataList = $this->where($where)
            ->order($order)
            ->paginate($page_config);
        $userModel = new User();
        foreach ($dataList as $k => $v) {
            $userDetail = $userModel->where('id', $v['user_id'])->find();
            $dataList[$k]['u_id'] = $userDetail['u_id'];
        }
        return $dataList;
    }

}